// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建词汇 POST /api/module/SmartDictionaries */
export async function smartDictionariesCreate(
  body: API.ChineseDictionaryCreateInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result>('/api/module/SmartDictionaries', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 批量删除 DELETE /api/module/SmartDictionaries/${param0} */
export async function smartDictionariesBulkDeletes(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartDictionariesBulkDeletesParams,
  options?: { [key: string]: any },
) {
  const { ids: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartDictionaries/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 简体/繁体转换 POST /api/module/SmartDictionaries/Convert/Chinese */
export async function smartDictionariesConvertChinese(
  body: API.ConvertChineseInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result1ConvertChineseOutputModel>(
    '/api/module/SmartDictionaries/Convert/Chinese',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 是否收藏 PUT /api/module/SmartDictionaries/Favorited/${param0} */
export async function smartDictionariesIsFavorited(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartDictionariesIsFavoritedParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartDictionaries/Favorited/${param0}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 分页查询 GET /api/module/SmartDictionaries/Page */
export async function smartDictionariesPagination(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartDictionariesPaginationParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResult1ChineseDictionaryOutputModel>(
    '/api/module/SmartDictionaries/Page',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}
